package com.xnyzc.lhy.mis.controller.cmsapi.statical;


import com.xnyzc.lhy.common.entity.Rv;
import com.xnyzc.lhy.mis.service.statical.OaSysStaticalAnalystService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author cuixiaojian
 * @since 2021-08-02
 */
@RestController
@RequestMapping("/cmsapi/statical")
public class OaSysStaticalAnalystController {
    @Autowired
    private OaSysStaticalAnalystService oaSysStaticalAnalystService;

    @ApiOperation(value = "当前时间数据统计分析",notes = "数据统计分析")
    @PostMapping("currentTimeInquiriesStatical")
    public Rv getIndexCurrentTimeStatical(String cityCode,String date,Integer channel){
        return oaSysStaticalAnalystService.getIndexCurrentTimeStatical(cityCode,date,channel);
    }

    @ApiOperation(value = "预约时间数据统计分析",notes = "数据统计分析")
    @PostMapping("appointmentInquiriesStatical")
    public Rv getIndexAppointmentStatical( String cityCode, String date, Integer channel){
        return oaSysStaticalAnalystService.getIndexAppointmentStatical(cityCode,date,channel);
    }

    @ApiOperation(value = "订单指派数据统计分析",notes = "数据统计分析")
    @PostMapping("appointmentAssignStatical")
    public Rv getIndexAssignStatical(String cityCode, String date){
        return oaSysStaticalAnalystService.getIndexAssignStatical(cityCode,date);
    }

    @ApiOperation(value = "里程内数据统计分析",notes = "数据统计分析")
    @PostMapping("appointmentMileageStatical")
    public Rv getIndexMileageStatical(String cityCode, String date,  Integer channel){
        return oaSysStaticalAnalystService.getIndexMileageStatical(cityCode,date,channel);
    }
}
